hdel key field [field ...]
Deletes one or more specified domains in the hash table key, and the nonexistent fields are ignored.In versions below Redis2.4, Hdel can delete only a single domain at a time, and if you need to delete multiple domains in
basic operation of Redis database base
1, Introduction:
The REDIS,K-V database can contain data types that have strings, hashes, lists, collections, and ordered collections.
data types support Push/pop,add/remove, intersection, and set, the
After many modifications, the operation is very stable and has been used in the production environment. Internal thread communication uses the wait ()/notify () mechanism, which is highly efficient. This article only discusses the multi-thread
Beckham _ redis hash type learning, Beckham _ redishash type
Redis Hash type
1. View hash commands
Ii. Detailed description of operating hash commands
1. View hash commands
1. Enter help @ hash
127.0.0.1: 6379> help @ hash
HDEL key field [field...]
Redis Hash is a string-type field and value mapping table, and hash is particularly useful for storing objects.1, Hset Method:Hset key field valueSet the value of the field (field) fields in the hash table key to value.If the key does not exist, a
original works, reproduced please indicate: http://blog.csdn.net/Xiejingfa/article/details/50550416
In the previous article, "Redis Note (ii)" In the Redis data structure-string string, we learned about Redis's most basic data structure, string, and
During cluster deployment, for high availability purposes, sessions are often shared and shared into two categories: Session replication and centralized management.Redis can play a more important role in the centralized management of the session.Two
Type and operation of a hashesRedis Hash is a string-type field and value mapping table. It's added, the delete operation is 0 (1) (average). Hash is particularly suitable for storing objects, compared to Gencun each word of an object into a single
Basic introduction to the Redis module[TOC]Reference
Redis Chinese official website
Redis Command Reference
Beginner's Tutorial
Data cache System:
MongoDB: Direct persistence, directly stored in the hard disk's cache
In Redis, a hash data type stores data that is very similar to storing a record in a MySQL database, a string of field and value mapping tables that are especially good for storing objects, but field values can only be strings and other types are
Each hash can store 4,294,967,295 key-value pairs
Type of hash (hash):
Hset Assignment Value
127.0.0.1:6379> hset H1 username java1234(integer) 1127.0.0.1:6379> hset H1 Password 123456(integer) 1
Hget value
127.0.0.1:6379> Hget H1 username"Java1
HASH type of Redis Data Type
HASH type-Features
Redis hash is a ing table between fields and values of the string type. Its Addition and deletion operations are O (1) (average ).Hash is particularly suitable for Object Storage. Compared to
Linux Version Information:
Copy Code code as follows:
Cat/etc/issue or Cat/etc/redhat-release (Linux view version of the current operating system release information)
CentOS Release 6.6 (Final)
(i) String type
The
I. Preface
Redis is not a simple key-value data container, it can not be understood as static storage data, it is a dynamic interaction of the data structure of the server, could be used as a cache, high-performance k-v database and so on.
It
Hash Common Command Review
Command
Function
Hset key field value
Set hash value
Hsetnx
Set hash value, field or key must not exist
Hget
Gets the value of a file
Suppose I have stored such a HASH {code...} In Redis ...} then let's assume that there are two concurrent operations in php, all of which are HGET json, and json_decode into php array. then, perform operations on a value. json_encode and then HSET
1,
Hset key field value
Sets the value of the field field in the hash table key to values.
Key does not exist, create.
field does not exist, create. already exists, covering it.
Example:
Hset hashkey1 field1 "value1"//CreateHset hashkey1 field1
Simple to use:Set insert String, get view
[Root@yum-down ~]# redis-cli-h 10.10.0.250-p 637910.10.0.250:6379> Set KeyName HelloOk10.10.0.250:6379> Get KeyName"Hello"10.10.0.250:6379>Filter:Show All
10.10.0.250:6379> keys *1) "Keya"2) "Keyna"3)
Follow the Redis Getting Started Guide to learn
Chapter III 5 Types of data----hash type
3.3 (hash type)
Redis uses several structures to store data in the form of a health-value pair, while the health value of a hash type (hash) is also a
Before this function is not concerned, the Memcache data storage method has been used, but since the replacement of Redis, for a hash of data storage and access for Memcache is very convenient, but the problem is, a hash of the list if the amount is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.